[16.0][IMP] lighting: add spare parts tab on product form#95
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 16.0 #95 +/- ##
==========================================
- Coverage 43.60% 43.57% -0.04%
==========================================
Files 283 283
Lines 8104 8128 +24
Branches 1564 1569 +5
==========================================
+ Hits 3534 3542 +8
- Misses 4475 4491 +16
Partials 95 95 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8c0c35b to
9f2619d
Compare
9f2619d to
3ff01f2
Compare
2 tasks
- product.py: rewrite _compute_is_spare_part with raw SQL to avoid N+1 queries on large recordsets (matches the pattern already used by _compute_is_optional_accessory). - product.py: add parent_spare_part_product_count computed field (raw-SQL compute) so the reverse lookup "which products list this record as a spare part" is available, matching the existing optional/required accessory pattern. - product.py: extend _check_product_dependency to forbid a product being its own spare part. - views/product_views.xml: add product_action_parent_spare_part_product action window and a stat button on the product form, matching the existing P. rec. acc. / P. mand. acc. buttons. - i18n/pt.po: fix translation reference syntax (double underscore on field refs, model_terms: on view arch refs) so the Portuguese translations actually load in Odoo 16.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.